home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-02-02 | 2.2 KB | 63 lines | [TEXT/GEOL] |
- Item 5877133 2-Feb-90 19:05PST
-
- From: MOOF Rollin, Keith A
-
- To: CPLUS.APPLE$ C++ Interest List--Apple Employees
- CPLUS.DEV$ C++ Interest List--Developers
-
- Sub: RE>DoToField_StaticLink ?
-
- Attn: Nerdworks, Dan Weston,PRT
- SentBy: Keith Rollin
- Date 2/2/90
- Subject RE>DoToField_StaticLink ???
- From Keith Rollin
- To Nerdworks, Dan Weston,PRT
-
- Reply to: RE>DoToField_StaticLink ???
- Folks,
-
- In the next batch of Macintosh technotes, there will be one that talks
- in-depth about the Static Link parameter, and how to use it. This will be
- technote #265. I'd post it here, but I don't have the final version yet. Since
- the technotes will be released in a week or two, and can be downloaded from
- AppleLink, I'd rather wait until then than pass out a pre-release note.
-
- Instead, here is a code sample from the technote that *SHOWS* what to do, but
- it doesn't explain anything. Hopefully, you can work by example until the
- final technotes come out.
-
- typedef pascal void (*FieldProcPtr) (StringPtr fieldName, Ptr fieldAddr,
- short fieldType, void
- *DoToField_StaticLink);
-
- pascal void CallDoToField(StringPtr, Ptr, short, void *, FieldProcPtr)
- = {
- 0x205F, // MOVEA.L (A7)+,A0 ; get the DoToField pointer
- 0x4A97, // TST.L (A7) ; check the StaticLink
- 0x6602, // BNE.S *+$0004 ; if non-zero, keep it in
- 0x588F, // ADDQ.L #$4,A7 ; if zero, pull it off
- 0x4E90 // JSR (A0) ; Call DoToField
- };
-
- pascal void TJustCommand::Fields(FieldProcPtr DoToField, void
- *DoToField_StaticLink)
- {
- CallDoToField("\pTJustCommand", NULL, bClass, DoToField_StaticLink,
- DoToField);
- CallDoToField("\pfTEView", (Ptr) &fTEView, bObject, DoToField_StaticLink,
- DoToField);
- CallDoToField("\pfOldJust", (Ptr) &fOldJust, bInteger,
- DoToField_StaticLink, DoToField);
- CallDoToField("\pfNewJust", (Ptr) &fNewJust, bInteger,
- DoToField_StaticLink, DoToField);
- inherited::Fields(DoToField, DoToField_StaticLink);
- }
-
-
-
- - Keith Rollin
- - Apple Developer Technical Support
-
-
-